#define  _CRT_SECURE_NO_WARNINGS 1

#include "BinarySearch.h"

void TestTree1()
{
	int arr[] = { 8, 3, 1, 10, 6, 4, 7, 14, 13 };

	BSTree<int> t;
	for (auto e : arr)
	{
		t.insert(e);
		t.InOrder();
	}
	
	t.insert(16);
	t.InOrder();
	for (auto e : arr)
	{
		t.erase(e);
		t.InOrder();
	}

}

void TestTree2()
{
	int arr[] = { 8, 3, 1, 10, 6, 4, 7, 14, 13 };

	BSTree<int> t;
	for (auto e : arr)
	{
		t.insert(e);
		t.InOrder();
	}

	t.insert(16);
	t.InOrder();
	
	BSTree<int> t1 = t;
	t1.InOrder();

	int arr2[] = { 8, 4, 7, 14, 13 };
	BSTree<int> t2;
	for (auto e : arr2)
	{
		t2.insert(e);
	}
	t2.InOrder();
	t2 = t;
	t2.InOrder();
	
}

int main()
{
	//TestTree1();
	TestTree2();

	return 0;
}